home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / ftree10f.zip / Weddings.ftx < prev   
Text File  |  1996-05-25  |  2KB  |  79 lines

  1. /*
  2.    Family Tree Rexx Script FTX
  3.  
  4.    Copyright (C) 1996 by <Nils Meier>
  5.  
  6.    Please send comments to / Kommentar bitte an
  7.         meier2@athene.informatik.uni-bonn.de
  8.  
  9.    <This script shows all wedding aniversaries in this year
  10.     / Dieses Skript zeigt jedes Heiratsjubilaeum in diesem Jahr>
  11.  
  12. */
  13.  
  14. /* ----------------------- Params  /  Parameter ------------------- */
  15.  
  16. datewidth=10
  17. yearwidth=datewidth+9
  18.  
  19. IF getLanguage()='Deutsch' THEN DO
  20.    header    ='Heiratsjubilaeum in diesem Jahr (Jahrestag) '
  21. END
  22. ELSE DO
  23.    header    ='Wedding Anniversary this year (next anniversary) '
  24. END
  25.  
  26. /* -------------------------- Output / Ausgabe --------------------- */
  27.  
  28. SAY(header)
  29. SAY(.........................................)
  30.  
  31.  
  32. /* Sort Families by Date Month,Day  /  Familien nach Monat,Tag sortieren  */
  33. rc=sortFamilies('MM,MD')
  34.  
  35.  
  36. /* Calculate actual year  /  aktuelles Jahr berechnen */
  37. thisyear=WORD(DATE(),3)
  38.  
  39. /* Display families in tree  /  Familien ausgeben */
  40.  
  41. rc=selectFamily('F')
  42.  
  43. DO WHILE rc=1
  44.  
  45.    /* Get month  /  berechne Monat */
  46.    result=getMarriageDate('m')
  47.  
  48.    /* Check if we've got a month  /  nachpruefen ob wir Monat haben */
  49.    IF result<>'?' THEN DO
  50.  
  51.       /* Get Day   /  berechne Tag */
  52.       day=getMarriageDate('D')
  53.       if day<>0 THEN
  54.          result=result||' '||day
  55.       result=LEFT(result,datewidth)
  56.  
  57.       /* Add anniversary  /  plus Jahrestag */
  58.       year=getMarriageDate('Y')
  59.       IF year<>0 THEN
  60.          result=result||' ('||thisyear-year||')'
  61.       result=LEFT(result,yearwidth)
  62.  
  63.       /* Add name,first name  /  plus Name,Vorname */
  64.       rc=selectPerson('f')
  65.       result=result||getName()||','||getFirstName()
  66.       rc=selectPerson('m')
  67.       result=result||' - '||getName()||','||getFirstName()
  68.  
  69.       /* output  /  Ausgabe */
  70.       SAY(result)
  71.    END
  72.  
  73.    /* Next one */
  74.    rc=selectFamily('N')
  75. END
  76.  
  77. /* Done */
  78. RETURN
  79.